import { Widget, WidgetManager } from "@/core";
import * as PIXI from 'pixi.js'
class Main extends Widget {
    public mounted() {
        console.log(this.name, 'mounted')
    }
    clickHandle(e: PIXI.interaction.InteractionEvent) {
        console.log('click', e)
    }
    startGame(e) {
        console.log('start game')
    }
    render(html) {
        return html`
        <div textAlign="center" @tap=${this.clickHandle.bind(this)}>
            <img src="stage.png" /> 
            <img src="logo.png" top=50/>
            <div textAlign="center" verticalAlign="center" left=100 bottom=120 ontap.stop=${this.startGame.bind(this)}>
                <component is="Graphic" />
                <span fontSize="40">开始游戏</span>
            </div>
        </div>
        `
    }
}
WidgetManager.registerWidget('Main', Main);
